package cn.wusifx.zabbix.request.builder.map;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.CreateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/map/create
 */
public class MapCreateRequestBuilder extends CreateRequestBuilder {
    private String name;
    private Integer width;
    private Integer height;
    public MapCreateRequestBuilder(String auth) {
        super("map.create", auth);
    }

    public MapCreateRequestBuilder(Long id, String auth) {
        super("map.create", id, auth);
    }

    public String getName() {
        return name;
    }

    public MapCreateRequestBuilder setName(String name) {
        this.name = name;
        return this;
    }

    public Integer getWidth() {
        return width;
    }

    public MapCreateRequestBuilder setWidth(Integer width) {
        this.width = width;
        return this;
    }

    public Integer getHeight() {
        return height;
    }

    public MapCreateRequestBuilder setHeight(Integer height) {
        this.height = height;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("name",name);
        baseRequest.getParams().put("width",width);
        baseRequest.getParams().put("height",height);
        return baseRequest;
    }
}
